import {createRouter, createWebHistory} from "vue-router"

const Login = () => import('../view/LoginView.vue')
const Index = () => import('../view/IndexView.vue')
const NotFound = () => import('../view/NotFound.vue')


const routes = [
    {
        path: "/",
        redirect: "index",
        component: Index,
    },
    {
        path: "/index",
        name: "index",
        component: Index,
    },
    {
        path: "/login",
        name: "login",
        component: Login
    },
    {
        path: "/notfound",
        name: "notfound",
        component: NotFound
    },
    {
        path: '/:catchAll(.*)',
        redirect: '/notfound'
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router